
#ifndef QDESIGNER_H
#define QDESIGNER_H

#include <QtCore/QPointer>
#include <QtGui/QApplication>
#include <sdk_global.h>

QT_BEGIN_NAMESPACE

#define qDesigner \
	(static_cast<QDesigner*>(QCoreApplication::instance()))

class QDesignerWorkbench;
class QDesignerToolWindow;
class WindowBase;
class QDesignerServer;
class QDesignerClient;
class QErrorMessage;

class QDESIGNER_SDK_EXPORT QDesigner: public QApplication
{
	Q_OBJECT
public:
	QDesigner(int &argc, char **argv);
	virtual ~QDesigner();

    void setUpPlugin();
    void initUI();
    void showMainWindow();

protected:
	//bool event(QEvent *ev);/*Eric*/

signals:
	void initialized();

public slots:
	//void showErrorMessage(const char *message);/*Eric*/
    void slotAboutToQuit();
private slots:
	void initialize();
	//void callCreateForm();/*Eric*/

private:
	bool parseCommandLineArgs(QStringList &fileNames, QString &resourceDir);
	void showErrorMessageBox(const QString &);

	WindowBase* m_mainWindow;
};

QT_END_NAMESPACE

#endif // QDESIGNER_H
